//表单数据验证JS
export function formRule() {
    return {
        title: [
            {
                required: true,
                message: `请设置图文标题`
            },
            {
                max: 80,
                message: `标题长度不能超过80个字符`
            },
        ],
        description: {
            required: false,
            max: 80,
            message: `图文摘要字数不能超过80个字符`
        },
        picUrl: [
            {
                required: true,
                message: `请上传图文封面图片`
            },
            {
                type: "url",
                message: `图片地址不是正确的URL地址`
            }
        ],
        url: [
            {
                required: true,
                message: `请设置链接地址`
            },
            {
                type: "url",
                message: `链接地址不是正确的URL地址`
            }
        ]
    }
}
